// Lean compiler output
// Module: Lean.Util.SCC
// Imports: public import Std.Data.HashMap.Basic public import Init.Data.Option.Coe
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#ifdef __cplusplus
extern "C" {
#endif
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf___redArg___lam__0(lean_object*, lean_object*);
lean_object* l_List_forM___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC_add___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_StateT_instMonad___lam__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__10;
lean_object* lean_mk_array(lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__18;
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__5;
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__6;
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__12;
lean_object* l_StateT_instMonad___lam__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__2;
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__14;
LEAN_EXPORT lean_object* l_Lean_SCC_scc(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__15;
lean_object* l_Id_instMonad___lam__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_push___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__8;
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_modifyDataOf___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_StateT_instMonad___lam__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg___closed__0;
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__17;
static lean_object* l_Lean_SCC_scc___redArg___closed__0;
LEAN_EXPORT lean_object* l_Lean_SCC_scc___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Std_DHashMap_Internal_Raw_u2080_insert___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__1;
static lean_object* l_Lean_SCC_scc___redArg___closed__1;
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__19;
lean_object* l_Id_instMonad___lam__2___boxed(lean_object*, lean_object*);
static lean_object* l_Lean_SCC_scc___redArg___closed__2;
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack___redArg___lam__0(lean_object*);
lean_object* l_instBEqOfDecidableEq___redArg(lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__13;
lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__3(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_push(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_modifyDataOf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_StateT_bind(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__3;
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__16;
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__7;
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__20;
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_SCC_scc___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_List_reverse___redArg(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__6(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__0;
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__11;
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__4;
uint8_t l_Option_instBEq_beq___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_instDecidableEqNat___boxed(lean_object*, lean_object*);
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9;
lean_object* l_Id_instMonad___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_nat_add(lean_object*, lean_object*);
lean_object* l_StateT_map(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC_add(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Id_instMonad___lam__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_StateT_instMonad___lam__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_StateT_pure(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg___closed__0() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 0;
x_2 = lean_box(0);
x_3 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_2);
lean_ctor_set_uint8(x_3, sizeof(void*)*2, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_ctor_get(x_4, 2);
x_6 = l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___redArg(x_1, x_2, x_5, x_3);
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_7; lean_object* x_8; 
x_7 = l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg___closed__0;
x_8 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_8, 0, x_7);
lean_ctor_set(x_8, 1, x_4);
return x_8;
}
else
{
lean_object* x_9; lean_object* x_10; 
x_9 = lean_ctor_get(x_6, 0);
lean_inc(x_9);
lean_dec_ref(x_6);
x_10 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_10, 0, x_9);
lean_ctor_set(x_10, 1, x_4);
return x_10;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg(x_2, x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_push___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = !lean_is_exclusive(x_4);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; 
x_6 = lean_ctor_get(x_4, 0);
x_7 = lean_ctor_get(x_4, 1);
x_8 = lean_ctor_get(x_4, 2);
x_9 = lean_box(0);
lean_inc(x_3);
x_10 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_10, 0, x_3);
lean_ctor_set(x_10, 1, x_6);
x_11 = lean_unsigned_to_nat(1u);
x_12 = lean_nat_add(x_7, x_11);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_7);
x_14 = 1;
lean_inc_ref(x_13);
x_15 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_15, 0, x_13);
lean_ctor_set(x_15, 1, x_13);
lean_ctor_set_uint8(x_15, sizeof(void*)*2, x_14);
x_16 = l_Std_DHashMap_Internal_Raw_u2080_insert___redArg(x_1, x_2, x_8, x_3, x_15);
lean_ctor_set(x_4, 2, x_16);
lean_ctor_set(x_4, 1, x_12);
lean_ctor_set(x_4, 0, x_10);
x_17 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_17, 0, x_9);
lean_ctor_set(x_17, 1, x_4);
return x_17;
}
else
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; 
x_18 = lean_ctor_get(x_4, 0);
x_19 = lean_ctor_get(x_4, 1);
x_20 = lean_ctor_get(x_4, 2);
x_21 = lean_ctor_get(x_4, 3);
lean_inc(x_21);
lean_inc(x_20);
lean_inc(x_19);
lean_inc(x_18);
lean_dec(x_4);
x_22 = lean_box(0);
lean_inc(x_3);
x_23 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_23, 0, x_3);
lean_ctor_set(x_23, 1, x_18);
x_24 = lean_unsigned_to_nat(1u);
x_25 = lean_nat_add(x_19, x_24);
x_26 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_26, 0, x_19);
x_27 = 1;
lean_inc_ref(x_26);
x_28 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_28, 0, x_26);
lean_ctor_set(x_28, 1, x_26);
lean_ctor_set_uint8(x_28, sizeof(void*)*2, x_27);
x_29 = l_Std_DHashMap_Internal_Raw_u2080_insert___redArg(x_1, x_2, x_20, x_3, x_28);
x_30 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_30, 0, x_23);
lean_ctor_set(x_30, 1, x_25);
lean_ctor_set(x_30, 2, x_29);
lean_ctor_set(x_30, 3, x_21);
x_31 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_31, 0, x_22);
lean_ctor_set(x_31, 1, x_30);
return x_31;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_push(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l___private_Lean_Util_SCC_0__Lean_SCC_push___redArg(x_2, x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_modifyDataOf___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_16; 
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
x_7 = lean_ctor_get(x_5, 1);
lean_inc(x_7);
x_8 = lean_ctor_get(x_5, 2);
lean_inc_ref(x_8);
x_9 = lean_ctor_get(x_5, 3);
lean_inc(x_9);
if (lean_is_exclusive(x_5)) {
 lean_ctor_release(x_5, 0);
 lean_ctor_release(x_5, 1);
 lean_ctor_release(x_5, 2);
 lean_ctor_release(x_5, 3);
 x_10 = x_5;
} else {
 lean_dec_ref(x_5);
 x_10 = lean_box(0);
}
x_11 = lean_box(0);
lean_inc(x_3);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_16 = l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___redArg(x_1, x_2, x_8, x_3);
if (lean_obj_tag(x_16) == 0)
{
lean_dec_ref(x_4);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_12 = x_8;
goto block_15;
}
else
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; 
x_17 = lean_ctor_get(x_16, 0);
lean_inc(x_17);
lean_dec_ref(x_16);
x_18 = lean_apply_1(x_4, x_17);
x_19 = l_Std_DHashMap_Internal_Raw_u2080_insert___redArg(x_1, x_2, x_8, x_3, x_18);
x_12 = x_19;
goto block_15;
}
block_15:
{
lean_object* x_13; lean_object* x_14; 
if (lean_is_scalar(x_10)) {
 x_13 = lean_alloc_ctor(0, 4, 0);
} else {
 x_13 = x_10;
}
lean_ctor_set(x_13, 0, x_6);
lean_ctor_set(x_13, 1, x_7);
lean_ctor_set(x_13, 2, x_12);
lean_ctor_set(x_13, 3, x_9);
x_14 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_14, 0, x_11);
lean_ctor_set(x_14, 1, x_13);
return x_14;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_modifyDataOf(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l___private_Lean_Util_SCC_0__Lean_SCC_modifyDataOf___redArg(x_2, x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack___redArg___lam__0(lean_object* x_1) {
_start:
{
uint8_t x_2; 
x_2 = !lean_is_exclusive(x_1);
if (x_2 == 0)
{
uint8_t x_3; 
x_3 = 0;
lean_ctor_set_uint8(x_1, sizeof(void*)*2, x_3);
return x_1;
}
else
{
lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; 
x_4 = lean_ctor_get(x_1, 0);
x_5 = lean_ctor_get(x_1, 1);
lean_inc(x_5);
lean_inc(x_4);
lean_dec(x_1);
x_6 = 0;
x_7 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_7, 0, x_4);
lean_ctor_set(x_7, 1, x_5);
lean_ctor_set_uint8(x_7, sizeof(void*)*2, x_6);
return x_7;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_alloc_closure((void*)(l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack___redArg___lam__0), 1, 0);
x_6 = l___private_Lean_Util_SCC_0__Lean_SCC_modifyDataOf___redArg(x_1, x_2, x_3, x_5, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack___redArg(x_2, x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf___redArg___lam__0(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
return x_2;
}
else
{
lean_object* x_3; 
x_3 = lean_ctor_get(x_2, 1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_2);
if (x_4 == 0)
{
lean_object* x_5; 
x_5 = lean_ctor_get(x_2, 1);
lean_dec(x_5);
lean_ctor_set(x_2, 1, x_1);
return x_2;
}
else
{
lean_object* x_6; uint8_t x_7; lean_object* x_8; 
x_6 = lean_ctor_get(x_2, 0);
x_7 = lean_ctor_get_uint8(x_2, sizeof(void*)*2);
lean_inc(x_6);
lean_dec(x_2);
x_8 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_8, 0, x_6);
lean_ctor_set(x_8, 1, x_1);
lean_ctor_set_uint8(x_8, sizeof(void*)*2, x_7);
return x_8;
}
}
else
{
lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; 
x_9 = lean_ctor_get(x_2, 0);
x_10 = lean_ctor_get_uint8(x_2, sizeof(void*)*2);
x_11 = lean_ctor_get(x_1, 0);
x_12 = lean_ctor_get(x_3, 0);
x_13 = lean_nat_dec_lt(x_12, x_11);
if (x_13 == 0)
{
uint8_t x_14; 
lean_inc(x_9);
x_14 = !lean_is_exclusive(x_2);
if (x_14 == 0)
{
lean_object* x_15; lean_object* x_16; 
x_15 = lean_ctor_get(x_2, 1);
lean_dec(x_15);
x_16 = lean_ctor_get(x_2, 0);
lean_dec(x_16);
lean_ctor_set(x_2, 1, x_1);
return x_2;
}
else
{
lean_object* x_17; 
lean_dec(x_2);
x_17 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_17, 0, x_9);
lean_ctor_set(x_17, 1, x_1);
lean_ctor_set_uint8(x_17, sizeof(void*)*2, x_10);
return x_17;
}
}
else
{
lean_dec_ref(x_1);
return x_2;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; 
x_6 = lean_alloc_closure((void*)(l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf___redArg___lam__0), 2, 1);
lean_closure_set(x_6, 0, x_4);
x_7 = l___private_Lean_Util_SCC_0__Lean_SCC_modifyDataOf___redArg(x_1, x_2, x_3, x_6, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf___redArg(x_2, x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC_add___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
if (lean_obj_tag(x_4) == 0)
{
uint8_t x_7; 
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_7 = !lean_is_exclusive(x_6);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_8 = lean_ctor_get(x_6, 3);
x_9 = lean_ctor_get(x_6, 0);
lean_dec(x_9);
x_10 = lean_box(0);
x_11 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_11, 0, x_5);
lean_ctor_set(x_11, 1, x_8);
lean_ctor_set(x_6, 3, x_11);
lean_ctor_set(x_6, 0, x_4);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_6);
return x_12;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
x_13 = lean_ctor_get(x_6, 1);
x_14 = lean_ctor_get(x_6, 2);
x_15 = lean_ctor_get(x_6, 3);
lean_inc(x_15);
lean_inc(x_14);
lean_inc(x_13);
lean_dec(x_6);
x_16 = lean_box(0);
x_17 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_17, 0, x_5);
lean_ctor_set(x_17, 1, x_15);
x_18 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_18, 0, x_4);
lean_ctor_set(x_18, 1, x_13);
lean_ctor_set(x_18, 2, x_14);
lean_ctor_set(x_18, 3, x_17);
x_19 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_19, 0, x_16);
lean_ctor_set(x_19, 1, x_18);
return x_19;
}
}
else
{
uint8_t x_20; 
x_20 = !lean_is_exclusive(x_4);
if (x_20 == 0)
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; 
x_21 = lean_ctor_get(x_4, 0);
x_22 = lean_ctor_get(x_4, 1);
lean_inc(x_21);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_23 = l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack___redArg(x_1, x_2, x_21, x_6);
x_24 = !lean_is_exclusive(x_23);
if (x_24 == 0)
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; 
x_25 = lean_ctor_get(x_23, 1);
x_26 = lean_ctor_get(x_23, 0);
lean_dec(x_26);
lean_inc(x_21);
lean_ctor_set(x_4, 1, x_5);
lean_inc_ref(x_1);
lean_inc(x_3);
x_27 = lean_apply_2(x_1, x_3, x_21);
x_28 = lean_unbox(x_27);
if (x_28 == 0)
{
lean_free_object(x_23);
{
lean_object* _tmp_3 = x_22;
lean_object* _tmp_4 = x_4;
lean_object* _tmp_5 = x_25;
x_4 = _tmp_3;
x_5 = _tmp_4;
x_6 = _tmp_5;
}
goto _start;
}
else
{
uint8_t x_30; 
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_30 = !lean_is_exclusive(x_25);
if (x_30 == 0)
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; 
x_31 = lean_ctor_get(x_25, 3);
x_32 = lean_ctor_get(x_25, 0);
lean_dec(x_32);
x_33 = lean_box(0);
x_34 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_34, 0, x_4);
lean_ctor_set(x_34, 1, x_31);
lean_ctor_set(x_25, 3, x_34);
lean_ctor_set(x_25, 0, x_22);
lean_ctor_set(x_23, 0, x_33);
return x_23;
}
else
{
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; 
x_35 = lean_ctor_get(x_25, 1);
x_36 = lean_ctor_get(x_25, 2);
x_37 = lean_ctor_get(x_25, 3);
lean_inc(x_37);
lean_inc(x_36);
lean_inc(x_35);
lean_dec(x_25);
x_38 = lean_box(0);
x_39 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_39, 0, x_4);
lean_ctor_set(x_39, 1, x_37);
x_40 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_40, 0, x_22);
lean_ctor_set(x_40, 1, x_35);
lean_ctor_set(x_40, 2, x_36);
lean_ctor_set(x_40, 3, x_39);
lean_ctor_set(x_23, 1, x_40);
lean_ctor_set(x_23, 0, x_38);
return x_23;
}
}
}
else
{
lean_object* x_41; lean_object* x_42; uint8_t x_43; 
x_41 = lean_ctor_get(x_23, 1);
lean_inc(x_41);
lean_dec(x_23);
lean_inc(x_21);
lean_ctor_set(x_4, 1, x_5);
lean_inc_ref(x_1);
lean_inc(x_3);
x_42 = lean_apply_2(x_1, x_3, x_21);
x_43 = lean_unbox(x_42);
if (x_43 == 0)
{
{
lean_object* _tmp_3 = x_22;
lean_object* _tmp_4 = x_4;
lean_object* _tmp_5 = x_41;
x_4 = _tmp_3;
x_5 = _tmp_4;
x_6 = _tmp_5;
}
goto _start;
}
else
{
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; 
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_45 = lean_ctor_get(x_41, 1);
lean_inc(x_45);
x_46 = lean_ctor_get(x_41, 2);
lean_inc_ref(x_46);
x_47 = lean_ctor_get(x_41, 3);
lean_inc(x_47);
if (lean_is_exclusive(x_41)) {
 lean_ctor_release(x_41, 0);
 lean_ctor_release(x_41, 1);
 lean_ctor_release(x_41, 2);
 lean_ctor_release(x_41, 3);
 x_48 = x_41;
} else {
 lean_dec_ref(x_41);
 x_48 = lean_box(0);
}
x_49 = lean_box(0);
x_50 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_50, 0, x_4);
lean_ctor_set(x_50, 1, x_47);
if (lean_is_scalar(x_48)) {
 x_51 = lean_alloc_ctor(0, 4, 0);
} else {
 x_51 = x_48;
}
lean_ctor_set(x_51, 0, x_22);
lean_ctor_set(x_51, 1, x_45);
lean_ctor_set(x_51, 2, x_46);
lean_ctor_set(x_51, 3, x_50);
x_52 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_52, 0, x_49);
lean_ctor_set(x_52, 1, x_51);
return x_52;
}
}
}
else
{
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; 
x_53 = lean_ctor_get(x_4, 0);
x_54 = lean_ctor_get(x_4, 1);
lean_inc(x_54);
lean_inc(x_53);
lean_dec(x_4);
lean_inc(x_53);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_55 = l___private_Lean_Util_SCC_0__Lean_SCC_resetOnStack___redArg(x_1, x_2, x_53, x_6);
x_56 = lean_ctor_get(x_55, 1);
lean_inc(x_56);
if (lean_is_exclusive(x_55)) {
 lean_ctor_release(x_55, 0);
 lean_ctor_release(x_55, 1);
 x_57 = x_55;
} else {
 lean_dec_ref(x_55);
 x_57 = lean_box(0);
}
lean_inc(x_53);
x_58 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_58, 0, x_53);
lean_ctor_set(x_58, 1, x_5);
lean_inc_ref(x_1);
lean_inc(x_3);
x_59 = lean_apply_2(x_1, x_3, x_53);
x_60 = lean_unbox(x_59);
if (x_60 == 0)
{
lean_dec(x_57);
x_4 = x_54;
x_5 = x_58;
x_6 = x_56;
goto _start;
}
else
{
lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; 
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_62 = lean_ctor_get(x_56, 1);
lean_inc(x_62);
x_63 = lean_ctor_get(x_56, 2);
lean_inc_ref(x_63);
x_64 = lean_ctor_get(x_56, 3);
lean_inc(x_64);
if (lean_is_exclusive(x_56)) {
 lean_ctor_release(x_56, 0);
 lean_ctor_release(x_56, 1);
 lean_ctor_release(x_56, 2);
 lean_ctor_release(x_56, 3);
 x_65 = x_56;
} else {
 lean_dec_ref(x_56);
 x_65 = lean_box(0);
}
x_66 = lean_box(0);
x_67 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_67, 0, x_58);
lean_ctor_set(x_67, 1, x_64);
if (lean_is_scalar(x_65)) {
 x_68 = lean_alloc_ctor(0, 4, 0);
} else {
 x_68 = x_65;
}
lean_ctor_set(x_68, 0, x_54);
lean_ctor_set(x_68, 1, x_62);
lean_ctor_set(x_68, 2, x_63);
lean_ctor_set(x_68, 3, x_67);
if (lean_is_scalar(x_57)) {
 x_69 = lean_alloc_ctor(0, 2, 0);
} else {
 x_69 = x_57;
}
lean_ctor_set(x_69, 0, x_66);
lean_ctor_set(x_69, 1, x_68);
return x_69;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC_add(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l___private_Lean_Util_SCC_0__Lean_SCC_addSCC_add___redArg(x_2, x_3, x_4, x_5, x_6, x_7);
return x_8;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = lean_box(0);
x_7 = l___private_Lean_Util_SCC_0__Lean_SCC_addSCC_add___redArg(x_1, x_2, x_3, x_5, x_6, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_addSCC(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l___private_Lean_Util_SCC_0__Lean_SCC_addSCC___redArg(x_2, x_3, x_4, x_5);
return x_6;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__6), 4, 0);
return x_1;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__5___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__4___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__3), 4, 0);
return x_1;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__2___boxed), 2, 0);
return x_1;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__1___boxed), 4, 0);
return x_1;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Id_instMonad___lam__0), 4, 0);
return x_1;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__1;
x_2 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__0;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__5;
x_2 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__4;
x_3 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__3;
x_4 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__2;
x_5 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__7;
x_6 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_6, 0, x_5);
lean_ctor_set(x_6, 1, x_4);
lean_ctor_set(x_6, 2, x_3);
lean_ctor_set(x_6, 3, x_2);
lean_ctor_set(x_6, 4, x_1);
return x_6;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__6;
x_2 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__8;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__18() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9;
x_2 = lean_alloc_closure((void*)(l_StateT_bind), 8, 3);
lean_closure_set(x_2, 0, lean_box(0));
lean_closure_set(x_2, 1, lean_box(0));
lean_closure_set(x_2, 2, x_1);
return x_2;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9;
x_2 = lean_alloc_closure((void*)(l_StateT_instMonad___lam__9), 6, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__12() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9;
x_2 = lean_alloc_closure((void*)(l_StateT_instMonad___lam__7), 6, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9;
x_2 = lean_alloc_closure((void*)(l_StateT_instMonad___lam__4), 6, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__16() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9;
x_2 = lean_alloc_closure((void*)(l_StateT_pure), 6, 3);
lean_closure_set(x_2, 0, lean_box(0));
lean_closure_set(x_2, 1, lean_box(0));
lean_closure_set(x_2, 2, x_1);
return x_2;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9;
x_2 = lean_alloc_closure((void*)(l_StateT_instMonad___lam__1), 6, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__14() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9;
x_2 = lean_alloc_closure((void*)(l_StateT_map), 8, 3);
lean_closure_set(x_2, 0, lean_box(0));
lean_closure_set(x_2, 1, lean_box(0));
lean_closure_set(x_2, 2, x_1);
return x_2;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__15() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__10;
x_2 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__14;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__17() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__13;
x_2 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__12;
x_3 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__11;
x_4 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__16;
x_5 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__15;
x_6 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_6, 0, x_5);
lean_ctor_set(x_6, 1, x_4);
lean_ctor_set(x_6, 2, x_3);
lean_ctor_set(x_6, 3, x_2);
lean_ctor_set(x_6, 4, x_1);
return x_6;
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__19() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__18;
x_2 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__17;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; 
lean_inc(x_5);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_7 = l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg(x_1, x_2, x_5, x_6);
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
if (lean_obj_tag(x_9) == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; 
lean_dec(x_8);
x_10 = lean_ctor_get(x_7, 1);
lean_inc(x_10);
lean_dec_ref(x_7);
lean_inc(x_5);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_11 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg(x_1, x_2, x_3, x_5, x_10);
x_12 = lean_ctor_get(x_11, 1);
lean_inc(x_12);
lean_dec_ref(x_11);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_13 = l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg(x_1, x_2, x_5, x_12);
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_13, 1);
lean_inc(x_15);
lean_dec_ref(x_13);
x_16 = lean_ctor_get(x_14, 1);
lean_inc(x_16);
lean_dec(x_14);
x_17 = l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf___redArg(x_1, x_2, x_4, x_16, x_15);
return x_17;
}
else
{
uint8_t x_18; 
lean_dec(x_5);
lean_dec_ref(x_3);
x_18 = lean_ctor_get_uint8(x_8, sizeof(void*)*2);
lean_dec(x_8);
if (x_18 == 0)
{
uint8_t x_19; 
lean_dec_ref(x_9);
lean_dec(x_4);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_19 = !lean_is_exclusive(x_7);
if (x_19 == 0)
{
lean_object* x_20; lean_object* x_21; 
x_20 = lean_ctor_get(x_7, 0);
lean_dec(x_20);
x_21 = lean_box(0);
lean_ctor_set(x_7, 0, x_21);
return x_7;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; 
x_22 = lean_ctor_get(x_7, 1);
lean_inc(x_22);
lean_dec(x_7);
x_23 = lean_box(0);
x_24 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_24, 0, x_23);
lean_ctor_set(x_24, 1, x_22);
return x_24;
}
}
else
{
lean_object* x_25; lean_object* x_26; 
x_25 = lean_ctor_get(x_7, 1);
lean_inc(x_25);
lean_dec_ref(x_7);
x_26 = l___private_Lean_Util_SCC_0__Lean_SCC_updateLowLinkOf___redArg(x_1, x_2, x_4, x_9, x_25);
return x_26;
}
}
}
}
static lean_object* _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__20() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_alloc_closure((void*)(l_instDecidableEqNat___boxed), 2, 0);
x_2 = l_instBEqOfDecidableEq___redArg(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; 
x_6 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__19;
lean_inc(x_4);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_7 = l___private_Lean_Util_SCC_0__Lean_SCC_push___redArg(x_1, x_2, x_4, x_5);
x_8 = lean_ctor_get(x_7, 1);
lean_inc(x_8);
lean_dec_ref(x_7);
lean_inc(x_4);
lean_inc_ref(x_3);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_9 = lean_alloc_closure((void*)(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___lam__0), 6, 4);
lean_closure_set(x_9, 0, x_1);
lean_closure_set(x_9, 1, x_2);
lean_closure_set(x_9, 2, x_3);
lean_closure_set(x_9, 3, x_4);
lean_inc(x_4);
x_10 = lean_apply_1(x_3, x_4);
x_11 = l_List_forM___redArg(x_6, x_10, x_9);
x_12 = lean_apply_1(x_11, x_8);
x_13 = lean_ctor_get(x_12, 1);
lean_inc(x_13);
lean_dec_ref(x_12);
lean_inc(x_4);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_14 = l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg(x_1, x_2, x_4, x_13);
x_15 = !lean_is_exclusive(x_14);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; 
x_16 = lean_ctor_get(x_14, 0);
x_17 = lean_ctor_get(x_14, 1);
x_18 = lean_ctor_get(x_16, 0);
lean_inc(x_18);
x_19 = lean_ctor_get(x_16, 1);
lean_inc(x_19);
lean_dec(x_16);
x_20 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__20;
x_21 = l_Option_instBEq_beq___redArg(x_20, x_19, x_18);
if (x_21 == 0)
{
lean_object* x_22; 
lean_dec(x_4);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_22 = lean_box(0);
lean_ctor_set(x_14, 0, x_22);
return x_14;
}
else
{
lean_object* x_23; 
lean_free_object(x_14);
x_23 = l___private_Lean_Util_SCC_0__Lean_SCC_addSCC___redArg(x_1, x_2, x_4, x_17);
return x_23;
}
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; 
x_24 = lean_ctor_get(x_14, 0);
x_25 = lean_ctor_get(x_14, 1);
lean_inc(x_25);
lean_inc(x_24);
lean_dec(x_14);
x_26 = lean_ctor_get(x_24, 0);
lean_inc(x_26);
x_27 = lean_ctor_get(x_24, 1);
lean_inc(x_27);
lean_dec(x_24);
x_28 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__20;
x_29 = l_Option_instBEq_beq___redArg(x_28, x_27, x_26);
if (x_29 == 0)
{
lean_object* x_30; lean_object* x_31; 
lean_dec(x_4);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_30 = lean_box(0);
x_31 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_31, 0, x_30);
lean_ctor_set(x_31, 1, x_25);
return x_31;
}
else
{
lean_object* x_32; 
x_32 = l___private_Lean_Util_SCC_0__Lean_SCC_addSCC___redArg(x_1, x_2, x_4, x_25);
return x_32;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg(x_2, x_3, x_4, x_5, x_6);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_SCC_scc___redArg___lam__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; 
lean_inc(x_4);
lean_inc_ref(x_2);
lean_inc_ref(x_1);
x_6 = l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg(x_1, x_2, x_4, x_5);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
lean_dec(x_7);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9; lean_object* x_10; 
x_9 = lean_ctor_get(x_6, 1);
lean_inc(x_9);
lean_dec_ref(x_6);
x_10 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg(x_1, x_2, x_3, x_4, x_9);
return x_10;
}
else
{
uint8_t x_11; 
lean_dec_ref(x_8);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
x_11 = !lean_is_exclusive(x_6);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; 
x_12 = lean_ctor_get(x_6, 0);
lean_dec(x_12);
x_13 = lean_box(0);
lean_ctor_set(x_6, 0, x_13);
return x_6;
}
else
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; 
x_14 = lean_ctor_get(x_6, 1);
lean_inc(x_14);
lean_dec(x_6);
x_15 = lean_box(0);
x_16 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_16, 0, x_15);
lean_ctor_set(x_16, 1, x_14);
return x_16;
}
}
}
}
static lean_object* _init_l_Lean_SCC_scc___redArg___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = lean_box(0);
x_2 = lean_unsigned_to_nat(16u);
x_3 = lean_mk_array(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_SCC_scc___redArg___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_SCC_scc___redArg___closed__0;
x_2 = lean_unsigned_to_nat(0u);
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_SCC_scc___redArg___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_1 = l_Lean_SCC_scc___redArg___closed__1;
x_2 = lean_unsigned_to_nat(0u);
x_3 = lean_box(0);
x_4 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_4, 0, x_3);
lean_ctor_set(x_4, 1, x_2);
lean_ctor_set(x_4, 2, x_1);
lean_ctor_set(x_4, 3, x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_SCC_scc___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_5 = lean_alloc_closure((void*)(l_Lean_SCC_scc___redArg___lam__0), 5, 3);
lean_closure_set(x_5, 0, x_1);
lean_closure_set(x_5, 1, x_2);
lean_closure_set(x_5, 2, x_4);
x_6 = l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__19;
x_7 = l_Lean_SCC_scc___redArg___closed__2;
x_8 = l_List_forM___redArg(x_6, x_3, x_5);
x_9 = lean_apply_1(x_8, x_7);
x_10 = lean_ctor_get(x_9, 1);
lean_inc(x_10);
lean_dec_ref(x_9);
x_11 = lean_ctor_get(x_10, 3);
lean_inc(x_11);
lean_dec(x_10);
x_12 = l_List_reverse___redArg(x_11);
return x_12;
}
}
LEAN_EXPORT lean_object* l_Lean_SCC_scc(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_SCC_scc___redArg(x_2, x_3, x_4, x_5);
return x_6;
}
}
lean_object* initialize_Std_Data_HashMap_Basic(uint8_t builtin);
lean_object* initialize_Init_Data_Option_Coe(uint8_t builtin);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_Lean_Util_SCC(uint8_t builtin) {
lean_object * res;
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_initialized = true;
res = initialize_Std_Data_HashMap_Basic(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Init_Data_Option_Coe(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg___closed__0 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg___closed__0();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___redArg___closed__0);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__6 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__6();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__6);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__5 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__5();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__5);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__4 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__4();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__4);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__3 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__3();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__3);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__2 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__2();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__2);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__1 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__1();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__1);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__0 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__0();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__0);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__7 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__7();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__7);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__8 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__8();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__8);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__9);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__18 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__18();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__18);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__13 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__13();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__13);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__12 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__12();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__12);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__11 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__11();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__11);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__16 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__16();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__16);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__10 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__10();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__10);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__14 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__14();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__14);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__15 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__15();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__15);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__17 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__17();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__17);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__19 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__19();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__19);
l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__20 = _init_l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__20();
lean_mark_persistent(l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___redArg___closed__20);
l_Lean_SCC_scc___redArg___closed__0 = _init_l_Lean_SCC_scc___redArg___closed__0();
lean_mark_persistent(l_Lean_SCC_scc___redArg___closed__0);
l_Lean_SCC_scc___redArg___closed__1 = _init_l_Lean_SCC_scc___redArg___closed__1();
lean_mark_persistent(l_Lean_SCC_scc___redArg___closed__1);
l_Lean_SCC_scc___redArg___closed__2 = _init_l_Lean_SCC_scc___redArg___closed__2();
lean_mark_persistent(l_Lean_SCC_scc___redArg___closed__2);
return lean_io_result_mk_ok(lean_box(0));
}
#ifdef __cplusplus
}
#endif
